<?php

// connect to ldap server
$ldapconn = ldap_connect("ldap.usb.ve")
    or die("Could not connect to LDAP server.");

if ($ldapconn) {

    // binding to ldap server
    $ldapbind = ldap_bind($ldapconn);

    // verify binding
    if ($ldapbind) {
        echo "LDAP bind successful...";
    } else {
        echo "LDAP bind failed...";
    }

    $sr = search_ldap($ldapconn,"ou=Group,dc=usb,dc=ve","memberUid=06-39590");

    $info = ldap_get_entries($ldapconn, $sr);
    echo "Data for " . $info["count"] . " items returned:<p>";

}

?>

